package com.hmy.finance.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

public enum ReceiveAdjustEnum {
    ;

    /**
     * 应收调整单状态
     */
    @Getter
    @AllArgsConstructor
    public enum Status {

        TO_SUBMIT(10, "待提交"),

        FINISH(20, "已完结");

        private final Integer state;

        private final String desc;

        /**
         * 根据状态获取描述
         *
         * @param state 设备状态值
         * @return 对应中文描述
         */
        public static String getClaimStatusDesc(int state) {
            String desc = null;
            for (Status en : Status.values()) {
                if (en.getState() == state) {
                    desc = en.getDesc();
                }
            }
            return desc;
        }
    }

    /**
     * 应收调整-调整方式
     */
    @Getter
    @AllArgsConstructor
    public enum AdjustWay {

        ADD(1, "增加"),

        SUBTRACT(2, "减免");

        private final Integer way;

        private final String desc;

    }

}
